#!/usr/bin/perl

use utf8;
use strict;
use warnings;
use DateTime;
#use Time::Piece;

my ($year, $month, $day) = @ARGV;

my $dt1 = DateTime->new(
		year 	=> $year,
		month	=> $month,
		day 	=> $day,
	);

my @t = localtime;
my $now_dt = DateTime->new(
		year 	=> $t[5] + 1900,
		month	=> $t[4] + 1,
		day 	=> $t[3] + 1,
	);

my $duration = $now_dt - $dt1;

my @units = $duration->in_units( qw(years months days) );
printf "%d years, %d months, and %d days\n", @units;
